﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Grebok.Service
{
    using Grebok.Domain;
    using Grebok.Persistence;
    using Grebok.Persistence.QueryModel;

    public class EmployeeSvc : BaseService
    {
        public IList<Employee> GetCustomerList()
        {
            IList<Employee> items = null;

            Query q = new Query();

            q.Criteria.Add(new Criterion() { Operator = CriteriaOperator.GreaterThan, PropertyName = "Id", Value = 7 });
            q.OrderClauses.Add(new OrderClause("FirstName", OrderClause.OrderClauseCriteria.Ascending));
            items = context.GetByCriteria<Employee>(q);

            return items;
        }
    }
}
